import React, { Component } from 'react'
import PropTypes from 'prop-types'
import './Item.css'

export default class Item extends Component {

    static propTypes = {
        avatar: PropTypes.string.isRequired,
        name: PropTypes.string.isRequired,
        home: PropTypes.string.isRequired
    }

    render() {
        const { avatar, name, home } = this.props
        return (
            <div className="item">
                <a href={home} rel="noreferrer" target="_blank">
                    <img src={avatar} alt="avatar" />
                </a>
                <span>{name}</span>
            </div>
        )
    }
}
